翻訳と辞書
Words near each other
・ Ranjith Siyambalapitiya
・ Ranjitha
・ Ranjitkar
・ Ranjitram Mehta
・ Ranjitram Suvarna Chandrak
・ Ranjitsinh Mohite-Patil
・ Ranjitsinh Pratapsinh Gaekwad
・ Ranjitsinhji
・ Ranjnoli
・ Ranjodh Singh Majithia
・ Ranjon Ghoshal
・ Ranjung United F.C.
・ RANK
・ Rank
・ Rank (album)
Rank (computer programming)
・ Rank (differential topology)
・ Rank (film)
・ Rank (formation)
・ Rank (graph theory)
・ Rank (J programming language)
・ Rank (linear algebra)
・ Rank (surname)
・ Rank 1
・ Rank 3 permutation group
・ Rank abundance curve
・ Rank and file
・ Rank and File (band)
・ Rank and insignia of the Tanzanian Armed Forces
・ Rank condition


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Rank (computer programming) : ウィキペディア英語版
Rank (computer programming)

In computer programming, rank with no further specifications is usually a synonym for (or refers to) "number of dimensions"; thus, a bi-dimensional array has rank ''two'', a three-dimensional array has rank ''three'' and so on.
Strictly, no formal definition can be provided which applies to every programming language, since each of them has its own concepts, semantics and terminology; the term may not even be applicable or, to the contrary, applied with a very specific meaning in the context of a given language.
In the case of APL the notion applies to every operand; and dyads ("binary functions") have a ''left rank'' and a ''right rank''.
The box below instead shows how ''rank of a type'' and ''rank of an array expression'' could be defined (in a semi-formal style) for C++ and illustrates a simple way to calculate them at compile time.

#include

/
* Rank of a type

* -------------

*

* Let the rank of a type T be the number of its dimensions if

* it is an array; zero otherwise (which is the usual convention)

*/
template struct rank
;
template
struct rank)>
;
/
* Rank of an expression

*

* Let the rank of an expression be the rank of its type

*/
template
char(&rankof(t(&)()))();


Given the code above the rank of a type T can be calculated at compile time by

:rank::value

and the rank of an array-expression ''expr'' by

:sizeof(rankof(expr))
==See also==

*Rank (linear algebra), for a definition of ''rank'' as applied to matrices
*Rank (J programming language), a concept of the same name in the J programming language


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Rank (computer programming)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.